import './App.css';
import createRoute from './router/createRoute';
import routeArrOrigin from './router/routeArr';
import {Routes} from "react-router-dom"

import {useSelector} from "react-redux"

function App() {
  
  let routeArr = useSelector((state)=>{
    return state.userReducer.userRoutes
  })
  console.log("routeArr",createRoute(routeArr.concat(routeArrOrigin)))
  return (
    <div className="App">
      <h1>路由显示区域</h1>
      <Routes>
        {createRoute(routeArr.concat(routeArrOrigin))}
      </Routes>
    </div>
  );
}

export default App;
